package com.example.shop.db

import android.content.Context
import androidx.room.Room

class AppDbUtils {
    companion object{
        private lateinit var appDb: AppDb
        fun init(context:Context){
            //数据库实例化
            appDb = Room.databaseBuilder(context,AppDb::class.java,"2206.db")
                .allowMainThreadQueries()
                .build()
        }
        //获取数据库
        fun getAppDb():AppDb = appDb
    }
}